public class UseSeason {

    public String getChineseSeason(Season season){
        StringBuffer buffer = new StringBuffer(128);

        int code = season.getCode();
        switch (code) {
            case 1:
                buffer.append("春天：春暖花开");
                break;
            case 2:
                buffer.append("夏天：烈日炎炎");
                break;
            case 3:
                buffer.append("秋天：秋高气爽");
                break;
            case 4:
                buffer.append("冬天：寒风呼啸");
                break;
            default:
                break;

        }
        return buffer.toString();
    }

    public String getChinese(Season season){
        StringBuffer buffer = new StringBuffer(128);

        switch (season) {
            case SPRING:
                buffer.append("春天：春暖花开");
                break;
            case SUMMER:
                buffer.append("夏天：烈日炎炎");
                break;
            case AUTUMN:
                buffer.append("秋天：秋高气爽");
                break;
            case WINTER:
                buffer.append("冬天：寒风呼啸");
                break;
            default:
                break;

        }
        return buffer.toString();
    }
    public static void main(String[] args) {
        UseSeason useSeason = new UseSeason();

        Season[] seasons = Season.values();
        for (int i = 0; i < seasons.length; i++) {
//            System.out.println(seasons[i]);
//            System.out.println(seasons[i].getCode());
            System.out.println(useSeason.getChineseSeason(seasons[i]));
        }
    }
}
